Class 30: Javascript for and while loops

Output goes here:



Homework: w3schools Examples

Using site pages: While Loops | For Loops | Arrays (Extra)


Arrays

Note: typeof returns arrays as "object". Anything can realistically be put inside an array.

Contents can be returned as a string using "name".toString().

Use [0] to access the first element, [1] to access the second element, and so on so forth.

cars.length will return the number of elements. cars.sort() sorts the array.


While Loops



Click here to return to index.html.